package org.admanager.piadladmapping.plugin.diagram.edit.policies;

import org.admanager.piadladmapping.plugin.diagram.edit.commands.PComponentCreateCommand;
import org.admanager.piadladmapping.plugin.diagram.edit.commands.PComponentPortCreateCommand;
import org.admanager.piadladmapping.plugin.diagram.edit.commands.PConnector2CreateCommand;
import org.admanager.piadladmapping.plugin.diagram.edit.commands.PConnectorRoleCreateCommand;
import org.admanager.piadladmapping.plugin.diagram.edit.commands.PMultiplicityCreateCommand;
import org.admanager.piadladmapping.plugin.diagram.edit.commands.PRoleCreateCommand;
import org.admanager.piadladmapping.plugin.diagram.providers.PiADLADManagementMetamodelElementTypes;
import org.eclipse.gef.commands.Command;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;

/**
 * @generated
 */
public class CBAPatternCBAPatternCompartmentItemSemanticEditPolicy extends
		PiADLADManagementMetamodelBaseItemSemanticEditPolicy {

	/**
	 * @generated
	 */
	public CBAPatternCBAPatternCompartmentItemSemanticEditPolicy() {
		super(PiADLADManagementMetamodelElementTypes.CBAPattern_2034);
	}

	/**
	 * @generated
	 */
	protected Command getCreateCommand(CreateElementRequest req) {
		if (PiADLADManagementMetamodelElementTypes.PMultiplicity_3037 == req
				.getElementType()) {
			return getGEFWrapper(new PMultiplicityCreateCommand(req));
		}
		if (PiADLADManagementMetamodelElementTypes.PRole_3038 == req
				.getElementType()) {
			return getGEFWrapper(new PRoleCreateCommand(req));
		}
		if (PiADLADManagementMetamodelElementTypes.PComponentPort_3040 == req
				.getElementType()) {
			return getGEFWrapper(new PComponentPortCreateCommand(req));
		}
		if (PiADLADManagementMetamodelElementTypes.PConnectorRole_3041 == req
				.getElementType()) {
			return getGEFWrapper(new PConnectorRoleCreateCommand(req));
		}
		if (PiADLADManagementMetamodelElementTypes.PComponent_3042 == req
				.getElementType()) {
			return getGEFWrapper(new PComponentCreateCommand(req));
		}
		if (PiADLADManagementMetamodelElementTypes.PConnector_3047 == req
				.getElementType()) {
			return getGEFWrapper(new PConnector2CreateCommand(req));
		}
		return super.getCreateCommand(req);
	}

}
